package com.meilai.project.dto.personnel.onTurn;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.meilai.project.dto.workflow.WorkFlowExtraSubmitDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@ApiModel(value = "请求对象-考察登记", description = "请求对象-考察登记")
public class EntryApplyDTO extends WorkFlowExtraSubmitDTO {

    @NotNull(message = "部门不得为空")
    @ApiModelProperty(value = "部门id", example = "1", required = true)
    private Long entry_dep_id;
    @NotNull(message = "岗位不得为空")
    @ApiModelProperty(value = "部门岗位", required = true)
    private String entry_job;
    @NotNull(message = "姓名不得为空")
    @ApiModelProperty(value = "姓名", required = true)
    private String name;
    @NotNull(message = "性别不得为空")
    @ApiModelProperty(value = "性别", required = true)
    private String sex;
    @ApiModelProperty("照片")
    private String avatar;
    @NotNull(message = "生日不得为空")
    @ApiModelProperty(value = "生日", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate birth;
    @ApiModelProperty("政治面貌")
    private String political_landspace;
    @NotNull(message = "籍贯不得为空")
    @ApiModelProperty(value = "籍贯", required = true)
    private String native_place;
    @NotNull(message = "民族不得为空")
    @ApiModelProperty(value = "民族", required = true)
    private String national;
    @ApiModelProperty(value = "婚姻状况", required = true)
    private String marriage;
    @NotNull(message = "文化程度不得为空")
    @ApiModelProperty(value = "文化程度", required = true)
    private String degree;
    @NotNull(message = "身份证号码不得为空")
    @ApiModelProperty(value = "身份证号码", required = true)
    private String id_no;
    @NotNull(message = "联系电话不得为空")
    @ApiModelProperty(value = "联系电话", required = true)
    private String mobile;
    @NotNull(message = "户籍所在地不得为空")
    @ApiModelProperty(value = "户籍所在地", required = true)
    private String household_registration;
    @ApiModelProperty(value = "紧急联系电话", required = true)
    private String urgent_phone;
    @NotNull(message = "现居住地址不得为空")
    @ApiModelProperty(value = "现居住地址", required = true)
    private String home_address;
    @ApiModelProperty("QQ号码")
    private String qq;
    @ApiModelProperty(value = "能否接受工作调度 0：否  1：是", example = "1")
    private Integer dispatch;
    @ApiModelProperty(value = "能否接受加班 0：否  1：是", example = "1")
    private Integer work_overtime;
    @ApiModelProperty(value = "能否接受出差 0：否  1：是", example = "1")
    private Integer business_trip;
    @ApiModelProperty(value = "是否曾经被应聘 0：否  1：是", example = "1")
    private Integer employed;
    @ApiModelProperty(value = "是否有亲属或朋友在我司工作 0：否  1：是", example = "1")
    private Integer employed_friends;
    @ApiModelProperty("应聘的亲属朋友的名字")
    private String employed_relatives_friends_name;
    @ApiModelProperty("公司填写项-入编时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate comp_fill_entry_date;
    @ApiModelProperty("公司填写项-所属部门")
    private Long comp_fill_belong_dep_id;
    @ApiModelProperty("公司填写项-职务")
    private String comp_fill_job;
    @NotNull(message = "考察期开始日期不得为空")
    @ApiModelProperty(value = "公司填写项-考察期开始日期", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate comp_fill_probation_start;
    @NotNull(message = "考察期结束日期不得为空")
    @ApiModelProperty(value = "公司填写项-考察期结束日期", required = true)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate comp_fill_probation_end;
    @NotNull(message = "考察期工资不得为空")
    @ApiModelProperty(value = "公司填写项-考察期工资", required = true)
    private BigDecimal comp_fill_probation_salary;
    @NotNull(message = "入编后工资不得为空")
    @ApiModelProperty(value = "公司填写项-入编后工资", required = true)
    private BigDecimal comp_fill_salary;
    @ApiModelProperty("公司填写项-人资部意见")
    private String comp_fill_person_dep_opinion;
    @ApiModelProperty("公司填写项-用人部门意见")
    private String comp_fill_use_dep_opinion;
    @ApiModelProperty("公司填写项-总经理意见")
    private String comp_fill_manager_opinion;

    @ApiModelProperty("家庭成员")
    private List<EntryApplyFamilyMemberDTO> family_members = new ArrayList<>();
    @ApiModelProperty("工作经验")
    private List<EntryApplyWorkExperienceDTO> work_experiences = new ArrayList<>();
}
